<?php include('./templete/public/head.php')?>
<body>
<hr class="bgcolor" />
<!--评估-->
<div class="assess-main">
    <div class="assess-content ">
        <form class="myform">
            <div class="c-top">
                <ul class="comm-table-view">
                    <li class="table-view-cell table-view-cell2">
                        <a>
                            <span>提议名称</span>
                            <div class="top-text text1">
                                <?php echo $jdz_info['title']?>
                            </div>
                        </a>
                    </li>
                    <li class="table-view-cell table-view-cell2">
                        <a>
                            <span>提议解决办法</span>
                            <div class="top-text text1">
                                <?php echo $jdz_info['solution_content']?>
                            </div>
                        </a>
                    </li>
                    <li class="table-view-cell table-view-cell2">
                        <a>
                            <span>任务接受人</span>
                            <div class="top-text text1">
                                <?php echo get_user_info($task_info['user_id'])['name']?>
                            </div>
                        </a>
                    </li>
                    <li class="table-view-cell table-view-cell2">
                        <a>
                            <span>任务详情</span>
                            <div class="top-text text1">
                                <?php echo $task_info['content']?>
                            </div>
                        </a>
                    </li>
                </ul>
            </div>
            <hr class="bgcolor" />
            <input type="hidden" name="id" id="id" value="<?php echo $task_info['id']?>">
        </form>
        <div class="comm-btn assess-btn">
            <span class="color1 adopt">可以完成</span>
            <span class="color2 unadopt">不可以完成</span>
        </div>
    </div>
</div>
<script src="_js/plug/mui.picker.all.js"></script>
<?php include('./templete/public/script.php')?>
</body>
<script>

    //采纳
    $('.adopt').click(function () {
        var id=$('#id').val();
        var status = 1;
        put_status(id,status);
    });
    //不采纳
    $('.unadopt').click(function () {
        var id=$('#id').val();
        var status = 3;
        put_status(id,status);
    });
    function put_status(id,status) {
        $.ajax({
            url:'<?php echo url('confirm_task')?>',
            type:'post',
            data:{
                id:id,
                status:status,
            },success:function (data) {
                layer.msg(data.msg);
                setTimeout(function () {
                    location.href='<?php echo url('jdz/index')?>';
                },1000);
            }
        })
    }
</script>

</html>